Let’s build a JavaScript Engine in Rust by Jason Williams | JSConf EU 2019

Поделиться
HTML-код
  • Опубликовано: 22 янв 2025

Комментарии • 81

  • @ZapOKill
    @ZapOKill 5 лет назад +221

    if your name is json you have to write a js engine

  • @Yetipfote
    @Yetipfote 5 лет назад +99

    Q: So what do you do for a living?
    A: coding
    Q: So what do you after work?
    A: coding

    • @jasonmondesir8758
      @jasonmondesir8758 2 года назад +2

      This is exactly how my conversation went with someone from the business team, lol

  • @Mephistel
    @Mephistel 5 лет назад +41

    Finally, a way to run JS in the browser! /s
    Seriously though, this was really amazing to see, I'm learning Rust now and the possibilities like this fuel me.

  • @qcpresto
    @qcpresto 2 года назад +2

    This was a very good presentation; very good display of Rust's capabilities!

  • @thekwoka4707
    @thekwoka4707 11 месяцев назад

    Functions declared in the outside scope with the function keyword are generally parsed/compiled immediately, not only once they are run.

  • @LNTutorialsNL
    @LNTutorialsNL 5 лет назад +84

    I would love to have a runtime/engine that runs Typescript natively

    • @geeksy2278
      @geeksy2278 5 лет назад +6

      That would absolutely make no sense 🤔

    • @SimonBuchanNz
      @SimonBuchanNz 5 лет назад +7

      Deno embeds the typescript package (sort of) to transpile the code in the fly (sort of - caching etc...). Possibly good enough, but it has its own issues.
      Ideally the parser could be updated to simply skip typing related tokens, which would simplify a lot of current dev workflow nonsense, with the assumption that you're independently checking the types, so similar to the current Babel typescript workflow.
      I've been considering the issues related with this (and there are several!) while thinking about putting together a proposal, but I suspect that interest at least initially from TC39 would be pretty low, for a bunch of reasons: technical, philosophical and political (don't forget Flow exists....)

    • @KhoaNguyen96
      @KhoaNguyen96 5 лет назад +14

      @@geeksy2278 Why not? Node origin creator is working on deno, which is secure typescript engine (which is written in Rust btw).

    • @matthewburson2908
      @matthewburson2908 5 лет назад +2

      Already exists, created by the guy who made Node: Deno. Written in Rust as well. Surprised to see this video when something like this is already being done.

    • @norman784
      @norman784 5 лет назад +6

      @@matthewburson2908 There's some gotchas with deno, first of all it uses V8 and other dependencies, yes for sure you can run js and ts out of the box, but the issue (at least for me) is that it still uses C++ (iirc v8 is written in C++), so you still have the possible memory issues (highly unlikely because all the engineers working on it, but still), I think what OP wanted (or I can say I want) is a lightweight typescript runtime/engine, it can be done easly in pure rust, but what will take time is build all those optimizations made in the well known js engines.
      So a quick recap, deno still uses C++ and isn't pure rust, using pure rust give you the advantage of having one tool to build in all platforms, I find annoying that you cannot use easly the same c/c++ compiler in all platforms and having different build tools make harder to integrate each other, you need to build more complex build pipelines, etc.
      Yes this is a bit of my rant :)

  • @vilmm
    @vilmm 5 лет назад +7

    Cool project, well done!

  • @ermagerdh
    @ermagerdh 5 лет назад +3

    Revolutionary concept

  • @RY-gj8yb
    @RY-gj8yb 5 лет назад +12

    When you started the talk I started thinking about that final demo. And you made it. Is it an updatable JS engine? Future is beautiful.

    • @softwarelivre2389
      @softwarelivre2389 4 года назад +2

      It is being worked on as of today, but still requires lots of work in order to fully comply to the TC39 spec. If you're interested in contributing, please check it out! You can find it out at github.com/boa-dev/boa/

  • @lannesromain1453
    @lannesromain1453 5 лет назад +2

    Great and inspiring talk!

  • @Tunec_s_hlebom
    @Tunec_s_hlebom 8 месяцев назад

    Bro, are you amazing) I have making js runtime, but on c++) I was started it just like hobby. Rust is exotic thing for me)

  • @alekseysoldatenkov5675
    @alekseysoldatenkov5675 5 лет назад +46

    I hope Rust takes over the world (no pun intended) so that memory management and the vulnerabilities that often result from it, are a thing of the past.

    • @perc-ai
      @perc-ai 5 лет назад +7

      nope I hope Golang takes over the world

    • @vectorhacker-r2
      @vectorhacker-r2 5 лет назад +7

      @@perc-ai I hope both Rust and Golang take over the world.

    • @khai96x
      @khai96x 5 лет назад +28

      @@perc-ai Unlikely. Go isn't even a "better C". It is easy to learn for a C programmer, but it lacks the feature-completeness of a programming language. C, C++ and Rust don't require dynamic GC, yet Go does. Most typed languages have some kind of Generic Programming -(it is possible in even C thanks to type-cast)- but not Go. Go was designed to do one thing and good at that one thing only. It lacks the quality necessary to take over the industry.

    • @SimonBuchanNz
      @SimonBuchanNz 5 лет назад +9

      @@khai96x I always found the "better C++" claim of go hilarious, given that it has basically nothing in common with it other than curly braces!

    • @aNotoriousPhD
      @aNotoriousPhD 5 лет назад +5

      @@perc-ai golang is an under-featured language imo

  • @priyankpathak3917
    @priyankpathak3917 5 лет назад +8

    Rust it is!

  • @impssngr
    @impssngr 5 лет назад

    That's so exciting! Thanks for this talk!

  • @thekwoka4707
    @thekwoka4707 11 месяцев назад

    What would be the difference in using the Gc that you have vs just a Rc from std? Is there a real benefit?

  • @qazyhn94
    @qazyhn94 5 лет назад

    super interesting presentation, thank you!

  • @dravidkumar1492
    @dravidkumar1492 5 лет назад +1

    Really awesome

  • @philippejean1102
    @philippejean1102 5 лет назад

    aw Super coool, great presentation !!

  • @kjakobsen
    @kjakobsen 5 лет назад +18

    So his name is Json Williams? ;-)

  • @sagojez
    @sagojez 4 года назад

    What is the name of the theme of his vscode dough. Is beautiful hahaha

  • @vladislavsadretdinov
    @vladislavsadretdinov 5 лет назад +1

    what is vs code theme he using?

    • @sagojez
      @sagojez 4 года назад

      That’s the tal question here hahaha

  • @artahir123
    @artahir123 10 месяцев назад

    can anybody confirm ?
    he just translated that js code into rust code ?
    thats it ?

  • @saiqulhaq
    @saiqulhaq 5 лет назад +4

    let conf = 'RustConf Eu'

  • @jincyquones
    @jincyquones 5 лет назад +3

    Neat

  • @travelmoustache
    @travelmoustache 5 лет назад +3

    I know some of those words

  • @zakariachahboun
    @zakariachahboun 5 лет назад +1

    Awesome!

  • @nikhilsharma2804
    @nikhilsharma2804 7 месяцев назад

    Now know as 'BUN" , lol

  • @googlr214
    @googlr214 4 года назад

    why stop there, thinking of building an interpreter(engine) for python, scala, f#, sql

  • @lagimmediafiles6478
    @lagimmediafiles6478 5 лет назад +8

    I love JS and Python 3! And im a IT Professional....
    Software Engineer Soon!

  • @Viviko
    @Viviko Год назад +1

    I’m that one weirdo that actually wonders how this stuff is built. I may build my own engine actually. But, I’ll make it run on TypeScript instead. Maybe I can make it so we can run TypeScript on the browser without transpiring to JS. Lol. Idk. All I know is I wanna build my own engine and/or my own language.

  • @bobweiram6321
    @bobweiram6321 3 года назад +1

    So if you're a rust programmer, you can no longer get away with saying you're rusty.

  • @ZachBradyisBrachZady
    @ZachBradyisBrachZady 5 лет назад

    can't find this guy on twitter what the heck

    • @algoseekee
      @algoseekee 5 лет назад +3

      twitter.com/jason_williams , no problem :-)

  • @0xhhhhff
    @0xhhhhff 10 месяцев назад

    Its a nixe talk learnt a lot but my god is your choice of theme trash 😢